from locust import HttpUser, task, between


class QuickstartUser(HttpUser):
    wait_time = between(1, 2.5)
    cookie = {
        "FINANCE-CARPORT-TOKEN": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsIm1vYmlsZSI6IjEzMDU4MDE5MzAyIiwiaWF0IjoxNjM3MDUyNTcyLCJleHAiOjE2Mzc2NTczNzJ9.3Wuk5gj5cnxwoyXytY1G_R-RlV2SsLbJq0SK7sAFgj8"}
    @task
    def index(self):
        r = self.client.get('/data/finance-getRefundList?pageNum=1&pageSize=30', cookies=self.cookie)
        print(r.json())

    @task(3)
    def search(self):
        r = self.client.get('/data/sale-getCollectionReceiptWaterList?pageNum=1&pageSize=30', cookies=self.cookie)
        print(r.json())
